var form = document.getElementById("registerForm")

var inputUser = document.getElementById("setname");
var inputPassword = document.getElementById("setpassword");
var inputConPassword = document.getElementById("confirmpassword");

inputUser.onblur = function(){
    if(/^\w{5,9}$/.test(inputUser.value)){
        inputUser.nextElementSibling.innerHTML="<font color='green'>用户名输入正确</font>"
    }else{
        inputUser.nextElementSibling.innerHTML="<font color='red'>用户名输入错误</font>"
    }
};
inputPassword.onblur = function(){
    if(/^\d{3,5}$/.test(inputPassword.value)){
        inputPassword.nextElementSibling.innerHTML="<font color='green'>密码输入正确</font>"
    }else{
        inputPassword.nextElementSibling.innerHTML="<font color='red'>用户名输入错误</font>"
    }
};
inputConPassword.onblur = function(){
    if(/^\w{3,5}$/.test(inputConPassword.value)){
        inputConPassword.nextElementSibling.innerHTML="<font color='green'>用户名输入正确</font>"
    }else{
        inputConPassword.nextElementSibling.innerHTML="<font color='red'>用户名输入错误</font>"
    }
};







